﻿use employees
go
------------------10----------------------------------------------------------------
SELECT 
[Dept].[ID], 
[Dept].[City], 
Count([Empl].[ID])AS [AMOUNT]
FROM [dbo].[Dept] INNER JOIN [dbo].[Empl] 
ON [Dept].[ID] = [Empl].[DeptId]
WHERE [Empl].[FirstName] LIKE N'Vasiliy'
GROUP BY [Dept].[ID], [Dept].[City]
HAVING Count([Empl].[FirstName])>10

SELECT 
[Dept].[ID], 
[Dept].[City], 
Count([Empl].[ID]) AS [AMOUNT]
FROM [dbo].[Dept], [dbo].[Empl] 
WHERE [Dept].[ID] = [Empl].[DeptId] AND [Empl].[FirstName] LIKE N'Vasiliy'
GROUP BY [Dept].[ID], [Dept].[City]
HAVING Count([Empl].[FirstName])>10
